USE Liberty
GO

-- ------------------------------------------------------------------------------------------------
-- TypesOfPayment Table Create Script
-- ------------------------------------------------------------------------------------------------
SET NOCOUNT OFF
SET ANSI_NULLS ON
SET ANSI_PADDING ON
SET ANSI_WARNINGS ON
SET ARITHABORT ON
SET CONCAT_NULL_YIELDS_NULL ON
SET QUOTED_IDENTIFIER ON
SET NUMERIC_ROUNDABORT OFF
GO

PRINT 'Creating Table dbo.TypesOfPayment...'
GO

IF OBJECT_ID('dbo.TypesOfPayment', 'U') IS NULL
BEGIN
	CREATE TABLE dbo.TypesOfPayment
	(OID				bigint		IDENTITY(1, 1)	NOT NULL
	,Version			rowversion
	,Description		varchar(64)					NOT NULL
	,Active				tinyint						NOT NULL 
		CONSTRAINT DFLT_TypesOfPayment_Active DEFAULT (1)
	,DisplayOrder		smallint					NOT NULL 
	    CONSTRAINT DFLT_TypesOfPayment_DisplayOrder DEFAULT (1)
	,CreatedDate		datetime					NOT NULL
		CONSTRAINT DFLT_TypesOfPayment_CreatedDate DEFAULT GETDATE()

	,CONSTRAINT PK_TypesOfPayment PRIMARY KEY CLUSTERED( OID ) --ON PRIMARY
	)

	PRINT 'Table dbo.TypesOfPayment has been created successfully.'

END
ELSE 
BEGIN
    PRINT 'Table dbo.TypesOfPayment already exists.'
END

GO
